﻿using UnityEngine;
using System.Collections;

public class death_touch : MonoBehaviour {
	
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
		
	}
	void OnCollisionEnter2D(Collision2D collision){
		print (collision.gameObject.tag);


		if (collision.gameObject.name == "vihu_0") 
			GameMaster.KillPlayer(this.gameObject.GetComponent<Player>()); 
		

			

			if (collision.gameObject.tag=="piikit") 
			GameMaster.KillPlayer(this.gameObject.GetComponent<Player>());


		GameMaster.onkokuollut=false;


	}
}